# -*- coding: utf-8 -*-
import os,time
import unittest
import os,sys
from XTestRunner import HTMLTestRunner

import test_buySample2
from test_buySample2 import ParametrizedTestCase

base_dir = os.path.dirname(os.path.abspath(__file__))
base_dir = os.path.join(base_dir, 'report')

def run_case():
    print("aaaaaa")
    suite = unittest.TestSuite()
    suite.addTest(ParametrizedTestCase.parametrize(test_buySample2, param=""))
    unittest.TextTestRunner(verbosity=2).run(suite)


if __name__ == "__main__":
    # now_time = time.strftime('%Y-%m-%d_%H_%M_%S')
    # result_file = os.path.join("./", '%s_TestResult.html' % now_time)
    # with open(result_file, 'wb') as f:
    #     runner = HTMLTestRunner(
    #         stream=f,
    #         title='订单核心场景全链路自动化测试报告',
    #         description='执行失败的用例，点击fail可以查看traceId！skip用例不用关注！',
    #         language='zh-CN',
    #         tester="孙大圣"
    #     )
        run_case()
